Optimal. Leaf size=39 \[ \frac{\log (x)}{2}-\frac{\sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 b n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0304173, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {2635, 8} \[ \frac{\log (x)}{2}-\frac{\sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 b n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \frac{\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx &=\frac{\operatorname{Subst}\left (\int \sin ^2(a+b x) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=-\frac{\cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 b n}+\frac{\operatorname{Subst}\left (\int 1 \, dx,x,\log \left (c x^n\right )\right )}{2 n}\\ &=\frac{\log (x)}{2}-\frac{\cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 b n}\\ \end{align*}
Mathematica [A] time = 0.0714815, size = 36, normalized size = 0.92 \[ -\frac{\sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )-2 \left (a+b \log \left (c x^n\right )\right )}{4 b n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.022, size = 52, normalized size = 1.3 \begin{align*} -{\frac{\cos \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) \sin \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) }{2\,bn}}+{\frac{\ln \left ( c{x}^{n} \right ) }{2\,n}}+{\frac{a}{2\,bn}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.14662, size = 74, normalized size = 1.9 \begin{align*} \frac{2 \, b n \log \left (x\right ) - \cos \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) \sin \left (2 \, b \log \left (c\right )\right ) - \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )}{4 \, b n} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.49112, size = 119, normalized size = 3.05 \begin{align*} \frac{b n \log \left (x\right ) - \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{2 \, b n} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 23.0007, size = 56, normalized size = 1.44 \begin{align*} - \frac{\begin{cases} \log{\left (x \right )} \cos{\left (2 a \right )} & \text{for}\: b = 0 \wedge \left (b = 0 \vee n = 0\right ) \\\log{\left (x \right )} \cos{\left (2 a + 2 b \log{\left (c \right )} \right )} & \text{for}\: n = 0 \\\frac{\sin{\left (2 a + 2 b n \log{\left (x \right )} + 2 b \log{\left (c \right )} \right )}}{2 b n} & \text{otherwise} \end{cases}}{2} + \frac{\log{\left (x \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin \left (b \log \left (c x^{n}\right ) + a\right )^{2}}{x}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]